package com.nova.scenic.projectlibs.util.fragment;

import android.annotation.SuppressLint;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ListAdapter;
import android.widget.ListView;

import com.nova.scenic.projectlibs.R;

public class ListFragment extends BaseFragment{

	private ListView mListView = null;
	
	private Button mbtn1;
	private Button mbtn2;

	private ListAdapter mAdapter;
	
	@Override
	public void onActivityCreated(Bundle savedInstanceState) {
		super.onActivityCreated(savedInstanceState);
	}
	
	@Override
	@SuppressLint("InflateParams")
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		View view = inflater.inflate(R.layout.layout_list_fragment, null);
		mListView = (ListView) view.findViewById(R.id.id_listview_scenic_util_1);
		mbtn1 = (Button) view.findViewById(R.id.id_btn_scenic_util_1);
		mbtn2 = (Button) view.findViewById(R.id.id_btn_scenic_util_2);
		mbtn1.setText("option1");
		mbtn2.setText("option2");
		return view;
	}
	
	/**
     * Get the ListAdapter associated with this activity's ListView.
     */
    public ListAdapter getListAdapter() {
        return mAdapter;
    }

    
	public void setListAdapter(ListAdapter adapter){
		mListView.setAdapter(adapter);
		mAdapter = adapter;
	}
	
	public ListView getListView(){
		return mListView;
	}

	public Button getOptionBtn1() {
		return mbtn1;
	}

	public Button getOptionBtn2() {
		return mbtn2;
	}
	
	
}
